<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<style>
</style>
<body>
<!-- 容器 -->
<div id="root">
    <span :style="{opacity:n}">Welcome to my website!</span>
</div>
<script type="text/javascript">

    new Vue({
        el: '#root',
        data:{
            n:1,
        },
        mounted(){
            setInterval(()=>{
                this.n-=0.04;
                if(this.n<0){
                    this.n=1;
                }
            },90)
        }
    })

</script>
</body>
</html>